﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace LuShanTea.Admin.Web.Models
{
    public class UserAddNewModel
    {
        [Required(ErrorMessage = "用户名不能为空")]
        [RegularExpression(@"^[\u4E00-\u9FA5A-Za-z0-9_]{2,20}$", ErrorMessage = "请输入正确")]
        /// <summary>
        /// 用户真实姓名
        /// </summary>
        public string Name { get; set; }

        [Required(ErrorMessage = "用户昵称不能为空")]
        [RegularExpression(@"^[\u4E00-\u9FA5A-Za-z0-9_]{2,20}$", ErrorMessage = "请输入正确")]
        /// <summary>
        /// 用户昵称
        /// </summary>
        public string NiceName { get; set; }

        [Required(ErrorMessage = "手机号不能为空")]
        [Phone(ErrorMessage = "请输入正确")]
        /// <summary>
        /// 用户手机号
        /// </summary>
        public string PhoneNumber { get; set; }

        [Required(ErrorMessage = "用户邮箱不能为空")]
        [EmailAddress]
        /// <summary>
        /// 用户邮件
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// 用户头像地址
        /// </summary>
        public string ImgSrc { get; set; }

        [Required]
        /// <summary>
        ///  用户性别
        /// </summary>
        public int Gender { get; set; }

        [Required]
        [StringLength(6)]
        [MaxLength(18)]
        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }


    }
}